﻿using System.FileServer.Models;

namespace System.FileServer.ApiModels
{
    public class GetFilesByCheckCodeResponse
    {
        public GetFilesByCheckCodeResponse(FileDBModel dbModel)
        {
            this.ID = dbModel.FID;
            this.CurrentName = dbModel.CurrentName;
            this.OriginalName = dbModel.OriginalName;
            this.CurrentSavePoint = dbModel.CurrentPointName;
            this.Modified = dbModel.Modified;
            this.ModifiedBy = dbModel.ModifiedBy;
            this.Created = dbModel.Created;
            this.CreatedBy = dbModel.CreatedBy;
            this.CheckCode = dbModel.CheckCode;
        }
        /// <summary>
        /// ID
        /// </summary>
        public long ID { get; set; }
        /// <summary>
        /// 当前存储点
        /// </summary>
        public string CurrentSavePoint { get; set; } = "";
        /// <summary>
        /// 校验码
        /// </summary>
        public string CheckCode { get; set; } = "";
        /// <summary>
        /// 当前文件名
        /// </summary>
        public string CurrentName { get; set; } = "";
        /// <summary>
        /// 原始文件名
        /// </summary>
        public string OriginalName { get; set; } = "";
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime Created { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public long CreatedBy { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime Modified { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public long ModifiedBy { get; set; }
        /// <summary>
        /// 是否是完整的
        /// </summary>
        public bool Completed { get; set; } = true;
    }
}
